{% extends "teaBase.html" %}

{% block content %}
<div class="container-fluid text-center mb-0">
    <div class="container pt-5">
        {% if work_infos|length==0%}
        <h3 class="mb-0">当前没有判卷子任务</h3>
        {%else %}
        <h3 class="mb-0">阅卷吧</h3>
        {%endif%}
    </div>
</div>

<div class="container">
    <div class="exam-list mt-3">
        {%for work_info in work_infos%}
        <div class="exam-item mb-3 p-3">
            <h3>{{work_info[0].name}}</h3>
            <div class="exam-num-to-look">
                <span>
                    已阅/任务
                </span>
                <span>
                    <!-- 这里显示已阅和任务 -->
                    {{work_info[1].work_finished}}/{{work_info[1].work_count}}
                </span>
            </div>
            <div class="register-btn">
                {%if work_info[1].work_finished==work_info[1].work_count%}
                <a href="#" class="btn btn-dark btn-md disabled">已阅完</a>
                {%else%}
                <!-- 这里可能要传参，传考试id -->
                <a href={{url_for("tea.judgeExam",exam_id=work_info[0].id)}} class="btn btn-primary btn-md">进入阅卷>></a>
                {%endif%}
            </div>

        </div>
        {%endfor%}

    </div>
</div>
{% endblock %}